home *** CD-ROM | disk | FTP | other *** search
/ Univers Interactif 3 / INTERACTIF.BIN / pc / planeten / internet / intersl3.sit / InterslipRedialScript folder / InterslipRedialScript next >
Text File  |  1994-12-29  |  3KB  |  98 lines

  1. !Redial ⌐ 1994 Snap Systems, snap@netcom.com, on 94-12-25
  2. !permission to freely distribute granted as long as copyright message not modified
  3. !redial is a dialing script for InterSLIP written by Mark Hickenbottom
  4. !put in System Folder:Preferences:InterSLIP Folder:Dialing Scripts
  5. !advantages over the built-in script:
  6. !1: Written specifically for InterSLIP (not an ARA script).
  7. !2: Comments included in the script for anyone who wishes to modify the script.
  8. !3: Compatible with all modems, including older modems connected to fast computers.
  9. !4: Informs the user to connect and power on the modem, if needed.
  10. !5: Informs the user to connect the phone line, if needed.
  11. !6: Shows the phone number when dialing.
  12. !7: Shows the connect rate when connected.
  13. !8: Shows the error message if any.
  14. !9: Turns off the status lights when done.
  15. !10: And most important: Redials when the line is busy!
  16.  
  17. @ORIGINATE
  18. note "Connect and turn on modem right now."
  19. pause 1
  20. write "AT\13"
  21. note "Redial ⌐ 1994 Snap Systems"
  22. matchstr 1 1 "OK"
  23. matchread 50
  24. write "AT\13"
  25. matchread 10
  26. note "No modem. Check modem power and cable."
  27. pause 30
  28. exit -1
  29. !check for connected and powered modem
  30. !in certain cases, InterSLIP freezes when modem is not connected
  31. !in such cases, user must connect and power modem before continuing
  32. !pause 1 required to show note before writing to modem
  33. !if pause not there, note does not show up
  34. !modem message quickly disappears when modem is connected
  35. !matchstr is form: matchstr <matchbuffer> <jumplabel> <stringtomatch>
  36. !matchstr sets up buffer but does not jump
  37. !matchread <delay> waits for match and jumps to <jumplabel> if match
  38.  
  39. @LABEL 1
  40. write "^4M^2\13"
  41. matchstr 1 2 "OK"
  42. matchread 10
  43. !writes the initialization string ^4 stored in InterSLIP to modem
  44. !writes the speaker string ^2 which has the value 0 or 1
  45.  
  46. @LABEL 2
  47. write "ATDT^1\13"
  48. note "Dialing ^1"
  49. matchclr
  50. matchstr 1 3 "BUSY"
  51. matchexp 2 4 "CONNECT ....."
  52. matchexp 3 5 "ERRO."
  53. matchexp 4 5 "NO ANSWE."
  54. matchexp 5 5 "NO CARRIE."
  55. matchstr 6 6 "NO DIALTONE"
  56. matchread 600
  57. note "No response from modem."
  58. exit -1
  59. !dials the number ^1 stored in InterSLIP and jumps according to response
  60. !matchexp similar to matchread except periods match any character
  61. !matchexp stores result in ^0
  62.  
  63. @LABEL 3
  64. note "Busy. Redialing momentarily..."
  65. pause 30
  66. jump 2
  67.  
  68. @LABEL 4
  69. note "^0"
  70. pause 1
  71. exit 0
  72. !displays the result ^0 stored by matchexp such as CONNECT 57600
  73.  
  74. @LABEL 5
  75. note "^0"
  76. pause 30
  77. exit -1
  78. !displays the result ^0 stored by matchexp such as NO CARRIER
  79.  
  80. @LABEL 6
  81. note "No dialtone. Check your phone cord."
  82. pause 30
  83. exit -1
  84.  
  85. @HANGUP
  86. pause 11
  87. write "+++"
  88. pause 11
  89. write "ATH0\13"
  90. pause 11
  91. exit 0
  92. !InterSLIP doesn't seem to return responses during the hangup procedure
  93. !since responses aren't returned, no matchstr's or matchexp's are used
  94. !one second pause is required for the escape guard time
  95. !escape guard time is the delay required between the last character written and +++
  96. !pauses are in 10ths of seconds, so 11 would be 1.1 seconds
  97. !InterSLIP documentation is not correct when it says pauses are in 60ths of a second
  98.